//package com.wondream.app.config;
//
//import com.fasterxml.jackson.core.JsonParser;
//import com.fasterxml.jackson.core.json.JsonReadFeature;
//import com.fasterxml.jackson.databind.DeserializationFeature;
//import com.fasterxml.jackson.databind.ObjectMapper;
//import com.fasterxml.jackson.databind.SerializationFeature;
//import com.fasterxml.jackson.databind.json.JsonMapper;
//import com.fasterxml.jackson.databind.module.SimpleModule;
//import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
//import org.springframework.context.annotation.Bean;
//import org.springframework.context.annotation.Configuration;
//import org.springframework.http.converter.json.MappingJackson2HttpMessageConverter;
//
//@Configuration
//public class LongConverterConfig {
//
//	@Bean
//	public MappingJackson2HttpMessageConverter objectMapper() {
//        SimpleModule simpleModule = new SimpleModule();
//        simpleModule.addSerializer(Long.class, ToStringSerializer.instance);
//        simpleModule.addSerializer(Long.TYPE, ToStringSerializer.instance);
//        ObjectMapper objectMapper = JsonMapper.builder()
//        		.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES,false)		 // 忽略 JSON 字符串中不识别的属性
//        		.configure(SerializationFeature.FAIL_ON_EMPTY_BEANS,false)				// 忽略无法转换的对象
//        		.configure(JsonParser.Feature.ALLOW_SINGLE_QUOTES, true)
//        		.enable(JsonReadFeature.ALLOW_UNESCAPED_CONTROL_CHARS)				 // 允许出现特殊字符和转义符
//        		.addModule(simpleModule)
////        		.defaultDateFormat(new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"))
////        		.defaultTimeZone(TimeZone.getTimeZone("Asia/Shanghai"))
//        		.build();
//        return new MappingJackson2HttpMessageConverter(objectMapper);
//	}
//}
